﻿* Encoding: UTF-8.
 
***computing BMI

COMPUTE BMI=Weight/(Height/100) **2.
EXECUTE.

EXAMINE VARIABLES=BMI
  /PLOT BOXPLOT STEMLEAF HISTOGRAM NPPLOT
  /COMPARE GROUPS
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.
********************************************************

*** COMPUTING OXFORD HAPPINES SCORE

COMPUTE OXFORD.SCORE=MEAN(H1.R TO H29.R).
EXECUTE.

RECODE OXFORD.SCORE (4=4) (6=7) (1 thru 1.999=1) (2 thru 2.999=2) (3 thru 3.999=3) (4.001 thru 
    4.999=5) (5 thru 5.999=6) INTO HAPPINESS.
EXECUTE.

*******1=Not happy, 2=somewhat unhappy, 3= not particularly happy, 4= somewhat happ, 5 = rather happy, 6 = very happy, 7 = Too happy

FREQUENCIES VARIABLES=HAPPINESS
  /ORDER=ANALYSIS.

*******************************************

***QUALITY OF LIFE

COMPUTE QOL3R=6-QOL3.
COMPUTE QOL4R=6-QOL4.
COMPUTE QOL26R=6-QOL26.
EXECUTE.

EXECUTE. 
. 
COMPUTE DOM1=SUM(QOL3R,QOL4R,QOL10,QOL15,QOL16,QOL17,QOL18).
EXECUTE. 
COMPUTE DOM2=SUM(QOL5,QOL6,QOL7,QOL11,QOL19,QOL26R).
EXECUTE. 
COMPUTE DOM3=SUM(QOL20,QOL21,QOL22). 
EXECUTE. 
COMPUTE DOM4=SUM(QOL8,QOL9,QOL12,QOL13,QOL14,QOL23,QOL24,QOL25).
EXECUTE.


RECODE DOM1 (7=4) (8=6) (9=6) (10=13) (11=19) (12=19) (13=19) (14=25) (15=31) (16=31) (17=38) (18=38)
    (19=44) (20=44) (21=50) (22=56) (23=56) (24=63) (25=63) (26=69) (27=69) (28=75) (29=81) (30=81) (31=88) 
    (32=88) (33=94) (34=94) (35=100)  INTO PHYSICAL.
EXECUTE.

RECODE DOM2 (6=0) (7=6) (8=6) (9=13) (10=19) (11=19) (12=25) (13=31) (14=31) (15=38) 
    (16=44) (17=44) (18=50) (19=56) (20=56) (21=63) (22=69) (23=69) (24=75) (25=81) (26=81) (27=88) 
    (28=94) (29=94) (30=100) INTO PSYCHOLOGICAL.
EXECUTE.

RECODE DOM3 (3=0) (4=6) (5=19) (6=25) (7=31) (8=44) (9=50) (10=56) (11=69) (12=75) (13=81) 
    (14=94) (15=100) INTO SOCIAL.
EXECUTE.

RECODE DOM4  (8=0) (9=6) (10=6) (11=13) (12=13) (13=19) (14=19) (15=25) (16=25) (17=31) 
    (18=31) (19=38) (20=38) (21=44) (22=44) (23=50) (24=50) (25=56) (26=56) (27=63) (28=63) (29=69) 
    (30=29) (31=75) (32=75) (33=81) (34=81) (35=88) (36=88) (37=94) (38=94) (39=100) (40=100)  INTO ENVIRONMENT.
EXECUTE.


FREQUENCIES VARIABLES=PHYSICAL PSYCHOLOGICAL SOCIAL ENVIRONMENT
  /FORMAT=NOTABLE
  /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN SKEWNESS SESKEW KURTOSIS SEKURT
  /ORDER=ANALYSIS.

EXAMINE VARIABLES=PHYSICAL PSYCHOLOGICAL SOCIAL ENVIRONMENT 
  /PLOT BOXPLOT NPPLOT
  /COMPARE GROUPS
  /STATISTICS NONE
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

*******************************************************

*****************DASS21

COMPUTE Depression=sum(DASS.3,DASS.5,DASS.10,DASS.13,DASS.16,DASS.17,DASS.21)*2.
EXECUTE.

COMPUTE Anxiety=sum(DASS.2,DASS.4,DASS.7,DASS.9,DASS.15,DASS.19,DASS.20)*2.
EXECUTE.

COMPUTE Stress=sum(DASS.1,DASS.6,DASS.8,DASS.11,DASS.12,DASS.14,DASS.18)*2.
EXECUTE.

FREQUENCIES VARIABLES=Depression Anxiety Stress
  /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN SKEWNESS SESKEW KURTOSIS SEKURT
  /ORDER=ANALYSIS.

RECODE Depression (MISSING=SYSMIS) (Lowest thru 9=1) (10 thru 13=2) (14 thru 20=3) (21 thru 27=4) 
    (ELSE=5) INTO depcat.
RECODE Anxiety (MISSING=SYSMIS) (Lowest thru 7=1) (8 thru 9=2) (10 thru 14=3) (15 thru 19=4) 
    (ELSE=5) INTO Anxcat.
RECODE Stress (MISSING=SYSMIS) (Lowest thru 14=1) (15 thru 18=2) (19 thru 25=3) (26 thru 33=4) 
    (ELSE=5) INTO Strcat.
EXECUTE.

************** 1=  Nornal,  2=Mild,   3=Moderate,   4= Severe   5= Extreml severe 

FREQUENCIES VARIABLES=depcat Anxcat Strcat
  /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN SKEWNESS SESKEW KURTOSIS SEKURT
  /ORDER=ANALYSIS.


***********DASS21 AND QOL

COMPUTE Depression21 =DEPRESSION/2.
COMPUTE Anxiety21 = ANXIETY/2.
COMPUTE Stress21 = STRESS/2.
EXECUTE.


FREQUENCIES VARIABLES=PHYSICAL PSYCHOLOGICAL SOCIAL ENVIRONMENT Depression21 Anxiety21 Stress21
  /FORMAT=NOTABLE
  /STATISTICS=STDDEV MINIMUM MAXIMUM MEAN MEDIAN SKEWNESS SESKEW KURTOSIS SEKURT
  /ORDER=ANALYSIS.


EXAMINE VARIABLES=PHYSICAL PSYCHOLOGICAL SOCIAL ENVIRONMENT Depression21 Anxiety21 Stress21
  /PLOT BOXPLOT NPPLOT
  /COMPARE GROUPS
  /STATISTICS NONE
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

CORRELATIONS
  /VARIABLES=Depression21 Anxiety21 Stress21 PHYSICAL PSYCHOLOGICAL SOCIAL ENVIRONMENT
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE.
NONPAR CORR
  /VARIABLES=Depression21 Anxiety21 Stress21 PHYSICAL PSYCHOLOGICAL SOCIAL ENVIRONMENT
  /PRINT=SPEARMAN TWOTAIL NOSIG
  /MISSING=PAIRWISE.

****************************************






